package com.sunny.dao;

import com.sunny.pojo.House;
import com.sunny.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    int checkname(String name);

    int checkEmail(String email);

    User selectLogin(@Param("name") String name, @Param("password") String password);

    String selectQuestionByname(String name);

    int checkAnswer(@Param("name") String name,@Param("question") String question,@Param("answer") String answer);

    int updatePasswordByname(@Param("name") String name, @Param("passwordNew") String passwordNew);

    int checkPassword(@Param("password") String password, @Param("userId") Integer userId);

    int checkEmailByUserId(@Param("email") String email, @Param("userId") Integer userId);

    String getUserPhoneById(@Param("userId") Integer userId);

    List<User> selectUserByuser(User user);

    int deleteByIds(@Param("idList") List<String> idList);
}